﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Networking
{
    public partial class Form1 : Form
    {
        Server server;
        public Form1()
        {
            InitializeComponent();
            server = new Server("", 25000);
            server.Received += new ImageReceivedEventHandler(server_Received);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            server.Begin();
        }

        void server_Received(object sender, ImageReceivedEventArgs e)
        {
            pictureBox1.Image = e.ReceivedBitmap;
        }
    }
}
